Declarative and reactive data layer for component-based user interfaces

ABSTRACT

Each of a plurality of wire web components predicted to be included in a graphical user interface (GUI) for presentation at a client machine. Each data object instance may be associated with a respective data object instance identifier and a respective one or more data object fields. A wire web component graph that includes a plurality of nodes may be constructed. A node may correspond to a wire web component, a data object field, or an application procedure interface (API). One or more of the data values may be retrieved from the respective APIs based on the wire web component graph. A GUI message including the retrieved data values and the wire web component graph may be transmitted to the client machine,

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority under 35 U.S.C. 120 to Provisional U.S.Patent Application 62/840,458 by Venkiteswaran et al., titled “ADeclarative and Reactive Data Layer for Component-based UserInterfaces”, filed Apr. 30, 2019, which is hereby incorporated byreference in its entirety and for all purposes.

FIELD OF TECHNOLOGY

This patent document relates generally to client-server communicationsfor accessing data stored in database systems.

BACKGROUND

“Cloud computing” services provide shared resources, applications, andinformation to computers arid other devices upon request. In cloudcomputing environments, services can be provided by one or more serversaccessible over the Internet rather than installing software locally onin-house computer systems. Users can interact with cloud computingservices to undertake a wide range of tasks.

Users often interact with cloud computing systems via HTML-based userinterfaces. These user interfaces allow a user to view and/or updateinformation stored in a database system accessible via a cloud computingsystem. For example, a user interface may present information about arecord stored in a database system. Given the ubiquity of such userinterfaces, improved techniques for accessing data in database systemsvia HTML-based user interfaces are desired.

BRIEF DESCRIPTION OF THE DRAWINGS

The included drawings are for illustrative purposes and serve only toprovide examples of possible structures and operations for the disclosedinventive systems, apparatus, methods and computer program products forproviding component-based user interfaces. These drawings in no waylimit any changes in form and detail that may be made by one skilled inthe art without departing from the spirit and scope of the disclosedimplementations.

FIG. 1 illustrates an example of a method for a wire web componentlifecycle, performed in accordance with one or more embodiments.

FIG. 2 illustrates an example of an arrangement of components in aclient-server communication system, configured in accordance with one ormore embodiments.

FIG. 3 illustrates an example of a method for defining a wire webcomponent, performed in accordance with one or more embodiments.

FIG. 4 illustrates an example of a method for pre-processing a wire webcomponent, performed in accordance with one or more embodiments.

FIG. 5 illustrates an example of a method for creating a wire webcomponent, performed in accordance with one or more embodiments.

FIG. 6 illustrates an example of a data service, configured accordancewith one or more embodiments.

FIG. 7 illustrates an example of a method for updating wire webcomponent data, performed accordance with one or more embodiments,

FIG. 8 illustrates an example of a method for destroying a wire webcomponent, performed accordance with one or more embodiments.

FIG. 9 shows a block diagram of an example of an environment thatincludes an on-demand database service configured in accordance withsome implementations.

FIG. 10A shows a system diagram of an example of architecturalcomponents of an on-demand database service environment, configured inaccordance with some implementations.

FIG. 10B shows a system diagram further illustrating an example ofarchitectural components of an on-demand database service environment,in accordance with some implementations.

FIG. 11 illustrates one example of a computing device.

DETAILED DESCRIPTION

Techniques and mechanisms described herein provide for wire webcomponents that simplify and streamline the accessing and updating ofdata in web-based user interfaces. Many user interfaces rely on the webcomponent meta-specification, which itself is a combination of theCustom Elements specification, the shadow Document Object Model (DOM)specification, the Hypertext Markup Language (HTML) Templatespecification, and the ECMAScript (ES) Module specification. These fourspecifications combined allow developers to define their own HTML tags(i.e. custom elements) whose styles are encapsulated and isolated (i.e.a shadow DOM), that can be re-stamped many times (template), and have aconsistent way of being integrated into applications (i.e. the ESmodule).

In conventional systems, web components are used to present staticinformation. That is, a web-based user interface includes adeveloper-defined custom web component, and upon creation that webcomponent is populated in user interface presented in a browser at aclient machine with static information retrieved from a server. Likemost elements in the DOM, web components may be manually edited toinclude different information. However, conventional custom webcomponents do not support automatic updating based on changes made todata elsewhere in the user interface or on the server.

Techniques and mechanisms described herein provide for dynamicallyupdatable wire web components. According to various embodiments, a wireweb component may provide for an extensible framework. For example, HTMLmay be written to provide a layout. The HTML may be included in a wireweb component, which may also include programming logic for accessingand update data values to include in the rendered HTML. Developers maythen extend the framework to provide custom wire web components used togenerate custom user interface portions. The wire web component in arendered user interface may then be dynamically updated withoutrequiring the developer to specify procedural instructions forperforming such updating.

According to various embodiments, a wire web component graph may be usedto dynamically update data in a user interface. For example, each wireweb component may include one or more data fields, and each data fieldmay be associated with a data value retrievable via a respective API.Each wire web component, data field, and API may be represented as anode in the wire web component graph. The wire web component graph maythen be used to guide data access. For example, the wire web componentgraph may be used to consolidate the number of API requests and avoidretrieving duplicate data.

In some embodiments, the wire web component graph may be used todynamically update data after the user interface is rendered. Forexample, an updated data value may be generated by pushing a value froman API to the client machine. As another example, an updated data valuemay be generated by pulling a value from an API to the client machine.As yet another example, an updated data value may be generated byreceiving information from elsewhere in the user interface. Forinstance, a user interface may display a dual side-by-side workplace.One side of the interface may then provide information such as a pagenumber currently being presented in a scrollable section of theinterface. After a data value is updated, the data value may then beprovided to any web components in which the data value is included.

In particular embodiments, a declarative framework may provide forstatic analysis, For example, the server may analyze the user interfaceto predict data values that may be needed by the client machine. Asanother example, the server may analyze the user interface to predictcomponent definitions to include in a dynamically generated userinterface. As yet another example, a client machine may construct agraph of components included in the user interface.

In some implementations, component-level logic may provide for acomponent-level view of a data field. For example, a date value may beupdated for all components that include the data value. However, thesame date value may be presented differently (e.g., “May 1”, “May 1,2005”, or “2:30 pm, May 1, 2005”) for different web components,

In particular embodiments, wire web components may be added and/orremoved from a user interface after the user interface is rendered. Forexample, a wire web component may be added to a DOM tree. Thecorresponding wire web component graph may then be updated to include anadditional node so that data associated with the wire web component isaccessed for providing to the wire web component for display in the userinterface. As another example, a wire web component may be removed fromthe DOM tree. The corresponding wire web component graph may then beupdated to remove a node as necessary to avoid downloading unnecessarydata.

According to various embodiments, some techniques and mechanisms aredescribed herein with reference to web-based user interface. Further,some techniques and mechanisms described herein are illustrated withexamples in which web-based user interfaces are employed. However, thetechniques and mechanisms described herein are applicable to a widevariety of computing contexts, including contexts other than web-baseduser interfaces. For example, although a user interface component may bereferred to as a wire web component, such a component need not beimplemented in a web-based environment. Indeed, techniques andmechanisms related to wire web components may be applicable in any userinterface context in which a user interface is located remotely from thesource of some or all of the data presented in the user interface.

Consider the situation of an end user “Alex.” Alex is employing aconventional user interface that presents customer relations management(CRM) information associated with database records stored on a server.When Alex changes data such as the name of a customer contact in onepart of the user interface, that change is not reflected in another partof the user interface. Further, when a co-worker updates a record duringthe time when Alex is also viewing the record, the co-worker's update isnot reflected in Alex's user interface. This situation can createconfusion, race conditions, and inaccurate data.

Now suppose instead that Alex is employing a user interface configuredin accordance with an embodiment of techniques and mechanisms describedherein. When Alex changes data such as the name of a customer contact inone part of the user interface, that change is reflected elsewhere inthe user interface. For example, updating a customer contact name in adetailed record window results in the customer's contact name alsochanging in a list of customer contacts. Similarly, when a co-workerupdates a record during the time when Alex is also viewing the record,the co-worker's update is quickly reflected in Alex's user interface.For instance, when a co-worker on another computer updates the contactrecord on which Alex is also working to include a new mailing address,that change is reflected in Alex's user interface without requiring thatthe user interface be refreshed.

FIG. 1 illustrates an example of a method 100 for a wire web componentlifecycle, performed in accordance with one or more embodiments.According to various embodiments, the method 100 may be performed at asystem that includes a server in communication with a client machine,such as the system 200 shown in FIG. 2.

One or more wire web components are defined at 102. In someimplementations, a wire web component may include a custom HTML elementand associated computer programming code (e.g., JavaScript) configuredfor presentation in a graphical user interface implemented via HTML,According to various embodiments, a wire web component is a particulartype of wire web component that includes additional logic forautomatically performing operations such as auto-updating data on theclient and/or server side.

In some implementations, defining a wire web component may involvecreating and storing computer programming code that specifies one ormore properties associated with a wire web component, One such propertyfor a wire web component may be an identifier and/or address associatedwith an application procedure interface (API) for retrieving and/orstoring information. Another such property may be the identity of one ormore data fields for which to retrieve data values via the API. Inaddition to the information to be accessed, the wire web componentdefinition may specify information such as one or more filtering,processing, and/or updating procedures associated with the information.Additional details regarding a process for defining a custom wire webcomponent are discussed throughout the application, such as with respectto the method 300 shown in FIG. 3.

At 104, one or more wire web components included in a requested userinterface are pre-processed at a server. According to variousembodiments, a client machine may transmit to the server a request for auser interface. The server may then provide the computing programminginstructions necessary for the client to create the user interface. Inaddition, the server may evaluate the requested user interface toidentify and pre-process any wire web components included in the userinterface. This pre-processing may include operations such asconstructing a data dependency graph of the wire web components and/orpre-fetching data that the client machine is likely to request based onan analysis of the wire web components. Additional details related topre-processing one or more wire web components are discussed throughoutthe application, such as with respect to the method 400 shown in FIG. 4.

In particular embodiments, one or more of the wire web componentsincluded in the user interface may not be pre-processed. That is,pre-processing may in some instances improve the performance ofsubsequent requests from the client machine to the server. However,techniques and mechanisms described herein function even in the absenceof server-side pre-processing. Server-side pre-processing may be omittedfor any of a variety of reasons, such as scarce computational resources,the presence of a particularly complex configuration of wire webcomponents, a determination that pre-processing is likely to yieldminimal performance gains, and/or a determination that a wire webcomponent is associated with an external API not accessible via acomputing system associated with the server.

The requested user interface is created at the client machine at 106.According to various embodiments, creating the requested user interfacemay involve performing operations such as constructing a data dependencygraph among multiple wire web components, retrieving information for thewire web components from one or more APIs, processing the retrievedinformation, and/or providing the retrieved information for populatingone or more user interface components. Additional details regardingconstructing a requested user interface are discussed throughout theapplication, such as with respect to the method 500 shown in FIG. 5.Additional details regarding constructing dependency graphs arediscussed throughout the application, such as with respect to theexample 600 of a dependency graph shown in FIG. 6.

The one or more wire web components are updated at 108. In someimplementations, a wire web component may continue to be updated as longas it plays an active role in the user interface presented at the clientmachine. Updating the wire web component may involve operations such asreceiving data pushed from the server, pulling data from the server,pushing data to the server, responding to data pull requests from theserver, updating local data based on a change made elsewhere in the userinterface, and/or any other suitable operations. Additional detailsregarding updating one or more wire web components are discussedthroughout the application, such as with respect to the method 700 shownin FIG. 7.

The user interface at the client machine is destroyed at 110. Accordingto various embodiments, the entire user interface may be destroyed atonce. Alternately, a component of the user interface such as a specificwire web component may be destroyed individually when it is no longerneeded. For instance, a wire web component may be destroyed when theuser interface is updated to no longer include the wire web component.Destroying a wire web component may involve operations such as updatinga dependency graph to remove the wire web component, disconnecting aconnection to an API for accessing data associated with the wire webcomponent, and/or any other suitable operations. Additional detailsregarding updating one or more wire web components are discussedthroughout the application, such as with respect to the method 800 shownin FIG. 8.

FIG. 2 illustrates an example of an arrangement of components in aclient-server communication system 200, configured in accordance withone or more embodiments. The client-server communication system 200 maybe implemented at least in part via one or more components in a cloudsuch as the systems shown in FIGS. 9, 10A, 10B, and 11. Theclient-server communication system 200 may be configured to implementall or a portion of one or more of the methods described herein, such asthe methods shown in FIGS. 1, 2, 4, 5, 7 and 8.

The client-server communication system 200 includes a server 202. Theserver 202 includes a database system 204, a wire web component analysisengine 206, a user API A 208, a user API B 210, a user API C 212, and acommunication interface 214. In some implementations, the databasesystem 204 may store any suitable information. For example, the databasesystem 204 may store customer relations management (CRM) information,social networking information, or other such data. The database system204 may include a single database or potentially many differentdatabases. The database system 204 may be arranged in a centralizedstructure or in a distributed configuration. Additional details aboutdatabase systems are discussed throughout the application, such withrespect to FIGS. 9, 10A, and 10B.

In some embodiments, the wire web component analysis engine 206 mayperform one or more of a variety of operations related to wire webcomponents. For example, the wire web component analysis engine 206 maysupport the creation and/or provisioning of wire web components. Suchoperations may involve those associated with the definition of wire webcomponents, as discussed with respect to FIG. 3, and/or thepre-processing of wire web components, as discussed with respect to FIG.4.

According to various embodiments, the user APIs 208 through 212 may beused by a client machine to retrieve information from the server 202.For example, a user API may be used to retrieve information from thedatabase system 204. Different APIs may be used to retrieve differenttypes of information. For instance, one API may be used to accessdatabase records, while another API may be used to access a stream ofsocial networking information. Each API may define a protocol foraccessing information. In this way, the internal details of informationaccess may be abstracted away from the operation of the client machine.

In some implementations, the communication interface 214 may supportcommunications between the server 202 and one or more remote machines,such as client machines, via a network such as the network 230. Thenetwork 230 may include any suitable communications networks. Forinstance, the network 230 may include the Internet and/or one or moreprivate networks used to communicate with the server 202.

According to various embodiments, the user APIs D 220 and E 222 areexternal APIs not accessed via the server 202. In some configurations,one or both of these external APIs may be under the control of a serviceprovider associated with the server. Alternately, an external API may beunder the control of an entirely different entity. For example, theclient machine may communicate with one external API associated withTwitter to access a Twitter feed and may communicate with anotherexternal API to access a Facebook feed. That is, techniques andmechanisms described herein may be used to provide wire web componentsconfigured to access a variety of user APIs either internal or externalto the server 202 that is responsible for providing the wire webcomponent.

The client machine 252 includes a communication interface 260, aprocessor 254, a memory module 256, a display device 258, and a webapplication instance 272. According to various embodiments, the clientmachine 252 may be a desktop computer, a laptop computer, a tabletcomputer, a mobile phone, or any other suitable computing device.

In some embodiments, the web application instance 272 may include agraphical user interface for accessing information via a network. Theweb application instance 272 may be generated at least in part based oncomputer programming language instructions provided by the server 202.The information accessed via the web application instance 272 may beprovided by the server 202, by one or more external information sources,or by some combination thereof. The web application instance 272 may bepresented in a web browser, in a native application, or in any othersuitable manner.

The web application instance 272 includes a wire web componentprocessing engine 282. According to various embodiments, the wire webcomponent processing engine 282 may be used to generate, update, anddestroy wire web components in accordance with techniques and mechanismsdescribed herein. The wire web component processing engine may includesuch components as a component construction module 274, and eventprocessing module 276, a component destruction module 278, and a dataservice 280.

In some implementations, the component construction module 274 may beconfigured to create a wire web component, as discussed with respect tothe method 300 shown in FIG. 3. The event processing module 276 may beconfigured to update wire web components, as discussed with respect tothe method 700 shown in FIG. 7. The component destruction module 278 maybe configured to destroy a wire web component, as discussed with respectto the method 800 shown in FIG. 8. The data service 280 may beconfigured to manage communications between the wire web componentprocessing engine 282 and one or more external data sources, such as theuser APIs.

For the purpose of illustration, the client-server communication system202 includes only a single client machine, a single server, and alimited number of components such as user APIs. However, in practice asystem may include virtually any number of client machines, APIs, orother such components. In addition, components shown in FIG. 2 asresiding on the server 202 may in fact be located on different physicalmachines and/or distributed across multiple physical machines.

FIG. 3 illustrates an example of a method 300 for defining a wire webcomponent, performed in accordance with one or more embodiments. Themethod 300 may be used to define a new wire web component for providingto a client device that requests a user interface.

A request to define a wire web component is received at 302. Accordingto various embodiments, the request may be received at a server incommunication with a client machine. For example, the request may bereceived at the wire web component analysis engine 206 in communicationwith the client machine 252. I

n some implementations, the request may be generated by a developer of acomputing services client that accesses computing services via anon-demand computing services system associated with the server.Alternately, the request may be generated by a developer at thecomputing services system itself.

An identifier for the wire web component is determined at 304. Accordingto various embodiments, the identifier may be determined based on userinput. Alternately, or additionally, the system may automaticallydetermine all or a portion of the identifier. The identifier may providea mechanism by which to store and retrieve information associated withthe wire web component. For instance, the identifier may be used withincomputing programming code to invoke the wire web component when aninstance of a graphical user interface is created.

An API associated with the wire web component is identified at 306. Insome implementations, the API may be determined based on user input.Alternately, or additionally, the system may automatically determine theAPI. The API may identify the end point for accessing informationassociated with the wire web component. For example, the API may bespecified as an address such as a URI, IP address, or other suchinformation. As another example, the API may be specified as anidentifier that may subsequently be linked to an address for accessinginformation, For instance, the API may be specified as “Twitter”, withthe server maintaining a mapping from the API designator to the actualaddress used to access the API.

One or more data fields to access via the API are identified at 308. Insome implementations, a data field may be used as a parameter whencommunicating with the API. For instance, when an instance of the wireweb component is created, the client may transmit to the API informationsuch as an object identifier and data field identifier in order torequest to receive the data field value associated with the objectidentifier.

In particular embodiments, a wire web component may be associated withmore than one API and/or set of data fields. For example, a wire webcomponent may include some data fields accessed via an external socialnetworking feed and other data fields accessed via an API associatedwith the server.

Presentation logic associated with the wire web component is determinedat 310. According to various embodiments, the presentation logic mayinclude computer programming code for combining, filtering, or otherwiseprocessing raw data received via the API for presentation in a userinterface. For example, one data field may be a phone number associatedwith a user account. Presentation logic may be used to format the phonenumber to include a link that will automatically dial the phone number.As another example, another data field may be timestamp that includesdate and time information. Presentation logic may be used to extract andformat the date information for presentation in a portion of the userinterface where the time portion of the timestamp is not needed.

At 312, the wire web component is stored for retrieval upon request.According to various embodiments, the wire web component may be storedon a storage medium accessible via the wire web component analysisengine 206. For instance, the wire web component may be stored in thedatabase system 204. The information that is stored may include any orall of the information identified in the method 300, as well as anyother suitable information.

FIG. 4 illustrates an example of a method 400 for pre-processing a wireweb component, performed in accordance with one or more embodiments.According to various embodiments, the method 400 may be performed at aserver in communication with a client machine. For example, the method400 may be performed at a server when a client machine transmits to theserver a request to access a user interface.

A request to provide a user interface to a client machine is received at402. The request may be transmitted from a processing engine such as theengine 282 within a web application instance such as the instance 272shown in FIG. 2. The request may identify information such as thespecific user interface to present. In addition, the request may providecontextual information such as one or more object identifiers, useridentifiers, or other such information for identifying the informationand/or other content to be included in the user interface.

User interface definition information is identified at 404. According tovarious embodiments, the user interface definition information mayinclude one or more markup language files, wire web componentdefinitions, or other such computer programming code included in therequested user interface. For example, the user interface request mayinclude one or more identifiers such as URIs. The server may analyzethese identifiers to identify computer programming code involved inresponding to the user interface request and constructing the userinterface.

A determination is made at 406 as to whether to construct a wire webcomponent graph for the user interface. In particular embodiments, awire web component graph need not be constructed at the server. Forinstance, the server may provide the user interface definition to theclient machine without constructing a wire web component graph. Theclient machine may then construct the wire web component graph withoutfurther input from the server.

In some implementations, the determination made at 406 may be made atleast in part based on the availability of computing resources at theserver. For example, if the server has abundant resources available,then the wire web component graph may be at least partially constructedat the server, If instead the server has limited computing resourcesavailable, then the wire web component graph may not be constructed atthe server. For example, a decision may be made to not construct thewire web component graph if the server is processing a large number ofuser interface requests or is otherwise occupied.

In some implementations, the determination made at 406 may be made atleast in part based on the complexity of the user interface. Forinstance, if constructing the wire web component graph for the userinterface is estimated to involve an excessive amount of time, then adetermination may be made to not construct the graph at the server.

When it is determined that a wire web component graph for the userinterface is to be constructed at the server, a wire web component graphfor the user interface is constructed at 408. According to variousembodiments, the wire web component graph is constructed at least inpart based on the user interface definition information identified at404. The wire web component graph may be constructed by analyzing thedifferent wire web component definitions included in the user interfaceand then adding the components and their data fields to the graph.

In some embodiments, the server-side procedure for constructing the wireweb component graph may overlap considerably with operations performedon the client machine. Additional details regarding the construction ofa wire web component graph are discussed with respect to the method 500shown in FIG. 5.

In some implementations, the wire web component graph constructed at 408may be constructed at least in part by retrieving predetermined wire webcomponent graph information. For example, a static graph portion may beconstructed for a dynamic user interface and stored for retrieval uponrequest. Then, the wire web component graph for a particular request ofthe dynamic user interface may be constructed more quickly by startingwith the retrieved static portion.

One or more input parameters to retrieve data values from one or moreAPIs are determined at 410. According to various embodiments, one ormore input parameters may be determined based on analyzing the requestreceived at 402. For example, the request may include one or more objectidentifiers or other API parameters for constructing the user interface.

In some implementations, one or more input parameters may be identifiedbased on information associated with the source of the request. Forexample, the user interface may be requested from a client machineassociated with a user account, and an identifier for that user accountmay then be selected as an input parameter to one or more APIs.

In some embodiments, one or more input parameters may be determined byapplying a prediction model. The prediction model may be implementedbased on one or more static or dynamic rules, one or more machinelearning algorithms, and/or any other suitable prediction procedure. Forinstance, successive requests for user interfaces may be used to train adeep learning procedure to identify data likely to be requested by usingas outcomes the data ultimately accessed in conjunction with eachrequest.

In some embodiments, the prediction model may also be used to predictone or more portions of the wire web component graph. For example, thespecific wire web components to include in a user interface may dependon dynamically determined values. Such values may be predicted and usedas an input to identify one or more wire web components, data values,APIs, or other such portions of a wire web component graph.

At 412, one or more data values are retrieved from the one or more APIsbased on the data dependency graph. According to various embodiments,the one or more data values may be retrieved by transmitting one or moreof the input parameters determined at 410 to the appropriate APIspecified in the data dependency graph. In some configurations, the APIsqueried in this way may be limited to those associated with thecomputing environment in which the server is situated, such as the APIs208, 210, and 212. Alternately, or additionally, external APIs such asthe APIs 220 and 222 shown in FIG. 2 may be queried.

User interface information for the requested user interface istransmitted to the client machine at 414. According to variousembodiments, the transmitted information may include the user interfacedefinition information identified at operation 404. When a wire webcomponent graph is constructed at the server, then informationassociated with the wire web component graph may be transmitted as well.Such information may include some or all of the wire web component graphconstructed at operation 408 and/or some or all of the data valuesretrieved at operation 412.

In particular embodiments, the wire web component graph may be onlypartially constructed at the server. For example, the server may attemptto predict input parameters such as data fields and/or data values butbe unable to predict some such values with a reasonable degree ofcertainty. For instance, a data value may be dynamically determined atthe client side. In such situations, the server may retrieve some datavalues for the user interface but not others, or may omit operation 412entirely.

As another example, the server may limit the wire web component graphconstruction to static portions. For example, the server may construct awire web component graph based on static wire web component definitionsbut not retrieve data values at 412 or include instances of the wire webcomponents in the wire web component graph.

As yet another example, the server may trim a wire web component graph,for instance by identifying cut points in the graph and removing graphportions on either side of the cut points. In one such approach, the cutpoints may be determined based on a portion of the user interfacepredicted to be visible immediately or almost immediately to a user.Then, the portions likely to be viewed sooner may be retrieved, whilethe portions on the other side of the cut point that are likely to beviewed later or not at all may be removed. In this way, both theserver-side processing time and the amount of information transmitted tothe client machine may be reduced, thus decreasing the time that elapsesbetween the request and the presentation of the user interface.

In particular embodiments, a partially constructed graph may betransmitted to the client machine and completed at the client machine.For example, the server may construct one or more static portions of agraph, and the client may complete one or more dynamic portions of agraph. As another example, the server may predict one or more parametersand retrieve one or more data values based on those predictions, and theclient may determine the actual data values to ultimately present in theuser interface. In such a situation, the client may in some instancesreceive data that it does not need, which can be discarded.

According to various embodiments, one or more of the operations shown inFIG. 4 may be performed in an order different than that shown. Forexample, the construction of the wire web component graph at 408 mayoccur after the prediction of one or more input parameters at 410.Alternately, such operations may be interleaved and/or performed inparallel. For example, the prediction of input parameters may beperformed as part of the process of constructing the wire web componentgraph.

FIG. 5 illustrates an example of a method 500 for creating a wire webcomponent, performed in accordance with one or more embodiments.According to various embodiments, the method 500 may be performed togenerate a user interface that includes one or more wire web componentsat a client machine.

A request to generate a user interface is received at 502. According tovarious embodiments, the request may be received as part of theinstantiation and/or operation of a web application. For example, aserver may communicate with a client machine to provide a webapplication for accessing information via the server. The webapplication may be presented as a native application or via a webbrowser. The client and server may perform operations such asestablishing a communications session, authenticating a user account,determining account permissions, and providing instructions forgenerating the user interface at the client machine.

A wire web component graph for the user interface is instantiated at504. According to various embodiments, the wire web component graphrepresents relationships between one or more APIs, data values, and/orwire web components. Initially, the wire web component graph may beempty. Then, as wire web components are processed, the graph may beupdated to include one or more relationships.

A wire web component included in the user interface is selected at 506.According to various embodiments, the wire web components may beselected in any suitable order, such as in order of appearance or atrandom. In particular embodiments, a wire web component may be selectedfor analysis when it is first instantiated in the user interface.

An identifier for the wire web component is determined at 508. An APIassociated with the wire web component is identified at 510. One or moredata fields to retrieve via the API are identified at 512. According tovarious embodiments, such information may be identified or determined byaccessing a wire web component definition constructed as discussed withrespect to FIG. 3. The wire web component definition may be provided tothe client machine by the server, for instance in response to therequest to generate a user interface received at 502.

At 514, the wire web component graph is updated based on the identifiedinformation. According to various embodiments, updating the wire webcomponent graph may involve adding to the graph any nodes that are notalready present. For example, if the wire web component identifierdetermined at 508, the API identified at 510, or one or more of the datafields identified at 512 are not already present in the wire webcomponent graph, then the missing identifiers may be added as nodes tothe graph.

In some implementations, updating the wire web component graph mayinvolve adding relationships between components. For example, if theyare not already present, linkages may be added that connect the APIidentified at 510 to each of the one or more data fields identified at512. As another example, if they are not already present, linkages maybe added that connect the one or more data fields identified at 512 tothe wire web component identifier determined at 508.

A determination is made at 516 as to whether to select an additionalwire web component for analysis. As discussed with respect to operation506, wire web components may be selected in any suitable order.

When no additional wire web components are available to instantiate,then at 518 one or more data values associated with the data fields areretrieved. In some implementations, the one or more data values may beretrieved by the data service 280 accessing the appropriate APIs via anetwork to retrieve the data values. Such communication may involve thedata service providing information such as authentication data, objectidentifier information, data field identifier information, or any othersuitable data in accordance with the respective API.

In particular embodiments, the operations shown in FIG. 5 may beperformed in an order different than that shown. For example, datavalues may be retrieved as the wire web component graph is constructed.For instance, operation 518 may be performed after operation 512. Asanother example_(.), all or a portion of the wire web component creationmethod may be performed after the user interface is constructed, forinstance if new wire web components are added to the constructed userinterface.

FIG. 6 illustrates an example of a data service 280, configuredaccordance with one or more embodiments. The data service includes awire web component graph 604, constructed as discussed with respect tothe methods 400 and/or 500. The wire web component graph 604 includesuser APIs A 606, B 608, and C 610, data fields 612, 614, 616, 618, 620,and 622, and wire web components 624, 626, 628, 630, 632, and 634. Theconnections between the nodes represent dependency relationships.

In some embodiments, the wire web component graph 604 may be used toconduct operations related to updating data values. For example, thewire web component graph 604 may be used to identify a set of datafields that are retrieved from a single user API, even if those datafields are used by different wire web components. For instance, the datafield 614 is used by the wire web components 624, 626, and 628, whilethe data field 612 is only used by the wire web component 624. However,both the data field 614 and the data field 612 are associated with thesame user API, and retrieving both in the same API call may improveefficiency.

As another example, the data field 612 is only used by the wire webcomponent 624. Accordingly, were the wire web component 624 to bedisabled, then the data field 612 may no longer need to be updated.

In some implementations, as discussed with FIG. 4, all or a portion ofthe wire web component graph may be constructed as a staticrepresentation at the server. The static representation may then be usedto pre-fetch data to transmit to the client machine for constructing theuser interface.

According to various embodiments, as discussed with respect to FIG. 5,all or a portion of the wire web component graph may be constructed as adynamic representation at the client machine. The client-side dynamicconstruction may use a static representation constructed at the serveras an input. Alternately, the client-side dynamic construction may becreated independently of or instead of a server-side static wire webcomponent graph.

FIG. 6 illustrates an example of a data service 280, configuredaccordance with one or more embodiments. The data service 280 includes awire web component graph 604. The wire web component graph 604 includesuser APIs 606, 608, and 610, data fields 612, 614, 616, 618, 620, and622, wire web components 624, 626 628, 630, 632, 634, 636, 638, and wireweb component instances 640, 642, 644. According to various embodiments,the data service 280 may include one or more components not shown inFIG. 6, such as components for creating or editing the wire webcomponent graph 604.

In some implementations, each user API is a network endpoint throughwhich it is possible to access data. For instance, a user API may allowaccess to database objects, static or dynamic files, or informationstreams. In one example, a user API may facilitate access to a Twitterfeed, a Salesforce Chatter feed, a Facebook feed. In another example, auser API may expose a query interface for accessing a database. In yetanother example, a user API may provide access to a cloud storagerepository such as AWS S3 or Goggle Cloud Storage.

In some embodiments, a user API may be provided in conjunction with theserver through which the user interface is accessed. For example, theuser interface may be provided based on an HTML request to a computingsystem that includes a web server, and that same computing system mayinclude one or more APIs for accessing information.

In some embodiments, a user API may be provided in conjunction with adifferent server. For example, the user interface may be provided basedon an HTML request to a computing system that includes a web server.However, one or more APIs used to access information to include in theuser interface may be located externally to the computing system. Forinstance, the user interface may be provided by Salesforce.com, whilethe API may be a Twitter feed or a Facebook feed.

In some embodiments, a user API may be publicly accessible. For example,an API for accessing a public social media feed may not requireauthentication. For such an API, a request may need to specify only suchinformation as the information sought to be retrieved.

In some embodiments, a user API may require authentication. For example,an API that exposes a database query interface may requireauthentication to ensure that the requesting account is authorized toaccess the requested information. Such authentication may be provided bya certificate, by a username and password combination, via apre-established authenticated communication session, or through anyother suitable mechanism.

According to various embodiments, each of the data fields identifiesinformation that is retrievable via an API. For example, a data fieldmay identify a database field, a database row, a file, data item from asocial networking feed, or other such information.

In some implementations, retrieval of the data field may requireadditional contextual information. For example, a data field mayidentify a database column, which may refer to a defined value only whenan object (i.e. row) identifier is provided as well. As another example,a data field for a social networking feed may identify information suchas comment text, which may refer to a defined value only in conjunctionwith other information such as the specific comment from which the textis to be retrieved.

In particular embodiments, more than one copy of a data field may bepresent if one or more wire web components access the same data fieldfor different contextual information. For example, a wire web componentmay retrieve a “name” field for five different “contact” objects. Inthis case, five copies of the “name” field may be included in the graphin association with different contextual information.

In particular embodiments, a single data field may include more than onecopy of contextual or instance information. For example, a “name” fieldfor a “contact” object may be associated with more than one objectidentifier so that the name field is accessed for each of the objectidentifiers.

According to various embodiments, each wire web component may correspondto a definition for a user interface portion configured in accordancewith techniques and mechanisms described herein. Each wire web componentmay include information from one or more data fields, which may each beretrievable from a respective API. For example, the wire web component632 includes the data fields 620 and 622, which are retrievable from theuser API C 610, as well as the data field 618, which is retrievable fromthe user API B 608.

In some implementations, different wire web components may include thesame data field. For example, the wire web components 632, 630, and 628each include the data field 618, which is accessible via the user API B608. By constructing the wire web component graph, such overlapping dataaccess may be revealed and used to consolidate queries to improveefficiency. For instance, rather than the data field 618 being requestedseparately for each of the wire web components 632, 630, and 628, asingle request may be made, with the results accessible by each of thewire web components 632, 630, and 628. In this way, the number of APIrequests and the amount of network traffic may potentially besignificantly reduced.

In some implementations, a wire web component may include other wire webcomponents. For example, the parent wire web component 626 includes thechild wire web components 636 and 638. Child wire web components may inturn include other child wire web components.

According to various embodiments, a wire web component graph may includeone or more instances of a wire web component definition. For example,the wire web component instances 640, 642, and 644 are instances of thewire web component definition 630. Such instances may identifycontextual information for retrieving data fields. For example, each ofthe wire web component instances 640, 642, and 644 may correspond todifferent instances of a wire web component for displaying a useraccount object. In particular embodiments, a static wire web componentmay be generated during static analysis, with multiple dynamic instancesof the static wire web component generated at run-time.

In some embodiments, a wire web component graph may be incomplete oronly partially constructed. For example, the server may partiallyconstruct a wire web component graph for a user interface request andsend the partially constructed graph to the client machine. The clientmachine may then continue to construct the wire web component graphbased on additional information at the client machine.

The wire web component graph 604 shown in FIG. 6 is presented forillustrative purposes only. In practice, the components, fields, andAPIs included in a wire web component graph depend on the specific userinterface being constructed. Accordingly, a wire web component graphconstructed for an actual user interface may include potentially manymore APIs, data fields, wire web components, and/or wire web componentinstances than are shown in FIG. 6.

FIG. 7 illustrates an example of a method 700 for updating wire webcomponent data, performed accordance with one or more embodiments. Themethod 700 may be performed after a user interface having one or morewire web components is created as discussed with respect to FIG. 5.While a user interface is active, the data represented in the userinterface may change. For example, a user may provide user input via theuser interface that changes a data value at one or more locations in theuser interface. As another example, the data may change on the server.As yet another example, an action or event may trigger a request toquery the server to determine if updated information is available.

A request to retrieve data for a user interface is received at 702.According to various embodiments, the request may be received when theuser interface is initiated, or at a later point in time. For example,the request may be triggered based on an event or user action. Asanother example, the method 700 may run continuously for an active userinterface. As yet another example, the method 700 may run whenever auser interface is made active. For instance, a user may access differentuser interfaces via different browser tabs. The method 700 may then beinitiated when the user selects the browser tab in which the relevantuser interface is located.

A wire web component graph associated with the user interface isidentified at 704. According to various embodiments, the wire webcomponent graph may be created as discussed with respect to the method500 shown in FIG. 5. Such a graph may specify the relationships betweenAPIs, data values, and wire web components. An example of such a graphis shown in FIG. 6. The client machine may maintain the graph, even asone or more wire web components are deactivated, as discussed withrespect to FIG. 8.

A request to update a data value for a data field included in the wireweb component graph is received at 706. According to variousembodiments, the request may be generated in any of a variety of ways.For example, a portion of the user interface in which the data value ispresented may be updated to include a new data value, for instance viauser input. As another example, the server may transmit a messageindicating that the data value has been updated on the server. As yetanother example, a user may provide user input indicating or triggeringa request to update a data value. As still another example, a runtimecontext may provide a signal. For example, the loading of designateddata values into a web browser user interface may trigger a request toupdate a different data field.

The data value is updated at 708. According to various embodiments,updating the data value may involve accessing the appropriate API andproviding information such as authentication data, an object instanceidentifier, and a data field identifier. The updated data value may thenbe received from the API via a communications interface, and the wireweb component updated in memory to include the updated data value.

In some implementations, updating the data value may involve retrievingdata from a different location at the client machine. For example, auser interface may present two different views side-by-side. In thisexample, a data value may indicate a page number associated with theother view. As another example, different component views of a datavalue may be displayed at different places in the user interface. Whenone of these component views are changed (e.g., via user input), thedata value associated with the component view may be updated.

An updated component view of the updated data field is determined at712. According to various embodiments, a component view may display afiltered and/or modified view of the underlying data value. For example,a component view of an address may add a link to the address in amapping application. The updated component view may be determined byapplying the data field component logic associated with the wire webcomponent dependent on the updated data field.

A determination is made at 714 as to whether the component view of theupdated data field changed. According to various embodiments, thedetermination may be made by analyzing and/or executing the logicassociated with the component view. As discussed herein, a componentview may display a filtered and/or modified view of the underlying datavalue. For example, a component view of a name may display only theinitials rather than the full first and last name. In this example, thecomponent view would not change if the name were updated to correct amisspelling but the initials were unaltered. As another example, atimestamp may be modified to include only the day and hour componentsrather than the year, day, hour, minute, and second components. In thisexample, even if the timestamp changes to a different value, thecomponent view of the timestamp would not change so long as the day andhour for the new timestamp were the same as the day and hour for theprevious timestamp.

The updated component view is transmitted to the wire web component at716. According to various embodiments, transmitting the updatedcomponent view to the wire web component may involve any suitableoperations for updating the user interface. For example, an updatedcomponent view data value may be updated in memory so that the wire webcomponent can access the data value. As another example, one or moreelements of a DOM tree may be modified to include the updated componentview.

According to various embodiments, the Document Object Model (DOM) is across-platform and language-independent application programminginterface that treats an HTML, XHTML, or XML document as a treestructure wherein each node is an object representing a part of thedocument. The DOM represents a document with a logical tree. A branch ofthe tree ends in a node, and a node may contain objects. DOM methodsallow programmatic access to the tree. For example, a DOM method mayallow changing the structure, style, and/or content of a document.

A determination is made at 718 as to whether to select an additionalwire web component for analysis. As discussed with respect to operation710, wire web components may be selected in any suitable order, such asin sequence, at random, or in parallel.

A determination is made at 720 as to whether to select an additionaldata field for updating. As discussed with respect to operations 702 and706, the method 700 may be run continuously to support on-demand and/orperiodic updating of any of the data values associated with one or morewired wire web components in the user interface.

According to various embodiments, one or more of the operations shown inFIG. 7 may be performed in an order different than that shown. Forexample, multiple data values associated with a single wire webcomponent may be updated at the same time. In such a configuration, awire web component may be updated as a unit rather than separatelyupdating individual data values associated with the wire web component.

FIG. 8 illustrates an example of a method 800 for destroying a wire webcomponent, performed accordance with one or more embodiments. Accordingto various embodiments, the method 800 may be performed at wire webcomponent processing engine at a client machine such as the wire webcomponent processing engine 282 shown in FIG. 2.

A request is received at 802 to remove a wire web component from the DOMtree. Such a request may be generated based on an action performed withrespect to the user interface. for example, a user may close a userinterface portion that includes the wire web component. As anotherexample, a user may navigate from one tab within a user interface to adifferent tab within the user interface, causing the first tab to becomehidden. As yet another example, the user interface may scroll so thatthe wire web component is no longer visible.

A determination is made at 804 as to whether the wire web componentincludes a child node. According to various embodiments, the DOM tree isa hierarchical structure in which code representing a user interfaceportion can itself include child portions that include child node coderepresenting other user interface portions. Accordingly, thedetermination at 804 may be made at least in part by analyzing the DOMtree to identify any such child nodes.

When it is determined that the wire web component includes a child node,one of the child nodes may be selected for removal at operation 806.According to various embodiments, the child nodes may be selected in anysuitable order. For example, child nodes may be selected for removal insequence, in parallel, or at random. In some implementations, childnodes may be selected at least in part via a recursive process. Forinstance, each child node of the wire web component may be selected forremoval in some order, with each descendent of that child node beingrecursively processed as part of the removal of the child node.

The child node is removed from the DOM tree at 808. According to variousembodiments, the child node may be removed by calling a DOM tree removalfunction for editing the DOM tree.

At 810, the child node is queued for removal from the wire web componentdependency graph. At 812, any orphaned data field nodes are queued forremoval from the wire web component dependency graph. According tovarious embodiments, an orphaned data field node is a data field in thewire web component dependency graph that is no longer connected to anywire web components that are not themselves queued for removal.

In some implementations, the wire web component processing engine 282may maintain a queue of nodes that have been flagged for removal.Alternately, or additionally, the nodes may be flagged for removal inthe wire web component graph. When a node is queued for removal, thenode may be removed at a time strategically determined based onconsiderations such as computing resource availability, bandwidthconsiderations, and/or one or more data access thresholds.

In some embodiments, a node that is queued for removal from the wire webcomponent dependency graph may be removed immediately. For example, theuser interface may be loaded on a mobile computing device or otherdevice having relatively limited computing power and/or bandwidth. Asanother example, the user interface may have relatively high computingresource and/or bandwidth requirements due to the complexity of theinterface and/or the type or amount of data accessed. In suchsituations, removing the node immediately may help to alleviate resourceand/or bandwidth constraints.

In some embodiments, a node that is queued for removal from the wire webcomponent dependency graph may ultimately not be removed. For example,the user interface may be destroyed before removal occurs. As anotherexample, the node may subsequently be added back to the DOM tree. Forinstance, the user may provide user input that re-activates the wire webcomponent.

Alternately, a node queued for removal may be removed at a later pointin time. For example, the wire web component processing engine mayperiodically evaluate considerations such as the use and/or availabilityof computing resources and/or bandwidth. When bandwidth and/or computingresource usage exceeds a designated threshold, then the wire webcomponent processing engine may remove a node from the wire webcomponent dependency graph. For instance, nodes may be removed in theorder of “first in, first out.”

As another example, the wire web component processing engine may keepnodes queued for removal for a designated period of time, such as 1minute, 5 minutes, or 10 minutes. If the node has not been re-addedwithin the designated period of time, then the node may be removed fromthe wire web component dependency graph.

In particular embodiments, queuing the node for removal at 810 mayprovide for a balance between user interface responsiveness and resourceusage. On one hand, removing a node from the wire web componentdependency graph sooner (or immediately) may help to reduce bandwidthand/or computing resource usage by avoiding the cost of updating thedata associated with the node. On the other hand, removing a node fromthe wire web component dependency graph sooner (or immediately) may helpto improve user interface responsiveness by providing faster access tothe data associated with the node if the associated wire web componentis later re-added to the DOM tree. That is, if the wire web component islater re-added to the DOM tree, the data for that component wouldalready be available and would not need to be fetched if the nodeassociated with the wire web component has not yet been removed from thewire web component dependency graph. Given that the likelihood that acomponent is added to the DOM tree is higher for a recently-removed wireweb component, queueing components for removal in this way can providefaster access to the data in the average case.

A determination is made at 814 as to whether to select an additionalchild node for removal. As discussed with respect to operation 806,nodes may be selected for removal in any suitable order.

At 816, the wire web component is queued for removal for the dependencygraph. At 818, any orphaned data fields are queued for removal from thedependency graph. At 820, the wire web component is removed from the DOMtree. According to various embodiments, the operations 816-820 may beperformed in a manner substantially similar to the operations 808-812.

In particular embodiments, the operations shown in FIG. 8 may beperformed in an order different than that shown. For example, in arecursive procedure, each descendent of a node may be processed prior toprocessing the node itself. For example, in FIG. 6, removing the wireweb component 630 may involve first removal the wire web componentinstances 640, 642, and 644, as well as any children of each of thosenodes.

FIG. 9 shows a block diagram of an example of an environment 910 thatincludes an on-demand database service configured in accordance withsome implementations. Environment 910 may include user systems 912,network 914, database system 916, processor system 917, applicationplatform 918, network interface 920, tenant data storage 922, tenantdata 923, system data storage 924, system data 925, program code 926,process space 928, User Interface (UI) 930, Application ProgramInterface (API) 932, PL/SOQL 934, save routines 936, application setupmechanism 938, application servers 950-1 through 950- N, system processspace 952, tenant process spaces 954, tenant management process space960, tenant storage space 962, user storage 964, and applicationmetadata 966. Some of such devices may be implemented using hardware ora combination of hardware and software and may be implemented on thesame physical device or on different devices. Thus, terms such as “dataprocessing apparatus,” “machine,” “server” and “device” as used hereinare not limited to a single hardware device, but rather include anyhardware and software configured to provide the described functionality.

An on-demand database service, implemented using system 916, may bemanaged by a database service provider. Some services may storeinformation from one or more tenants into tables of a common databaseimage to form a multi-tenant database system (MIS). As used herein, eachMTS could include one or more logically and/or physically connectedservers distributed locally or across one or more geographic locations.Databases described herein may be implemented as single databases,distributed databases, collections of distributed databases, or anyother suitable database system. A database image may include one or moredatabase objects. A relational database management system (RDBMS) or asimilar system may execute storage and retrieval of information againstthese objects.

In some implementations, the application platform 18 may be a frameworkthat allows the creation, management, and execution of applications insystem 916. Such applications may be developed by the database serviceprovider or by users or third-party application developers accessing theservice. Application platform 918 includes an application setupmechanism 938 that supports application developers' creation andmanagement of applications, which may be saved as metadata into tenantdata storage 922 by save routines 936 for execution by subscribers asone or more tenant process spaces 954 managed by tenant managementprocess 960 for example. Invocations to such applications may be codedusing PL/SOQL 934 that provides a programming language style interfaceextension to API 932. A detailed description of some PL/SOQL languageimplementations is discussed in commonly assigned U.S. Pat. No.7,730,478, titled METHOD AND SYSTEM FOR ALLOWING ACCESS TO DEVELOPEDAPPLICATIONS VIA A MULTI-TENANT ON-DEMAND DATABASE SERVICE, by CraigWeissman, issued on Jun. 1, 2010, and hereby incorporated by referencein its entirety and for all purposes. Invocations to applications may bedetected by one or more system processes. Such system processes maymanage retrieval of application metadata 966 for a subscriber makingsuch an invocation. Such system processes may also manage execution ofapplication metadata 966 as an application in a virtual machine.

In some implementations, each application server 950 may handle requestsfor any user associated with any organization. A load balancing function(e.g., an F5 Big-IP load balancer) may distribute requests to theapplication servers 950 based on an algorithm such as least-connections,round robin, observed response time, etc. Each application server 950may be configured to communicate with tenant data storage 922 and thetenant data 923 therein, and system data storage 924 and the system data925 therein to serve requests of user systems 912. The tenant data 923may be divided into individual tenant storage spaces 962, which can beeither a physical arrangement and/or a logical arrangement of data.Within each tenant storage space 962, user storage 964 and applicationmetadata 966 may be similarly allocated for each user. For example, acopy of a user's most recently used (MRU) items might be stored to userstorage 964. Similarly, a copy of MRU items for an entire tenantorganization may be stored to tenant storage space 962. A UI 930provides a user interface and an API 932 provides an applicationprogramming interface to system 916 resident processes to users and/ordevelopers at user systems 912.

System 916 may implement a web-based user interface client-serversystem. For example, in some implementations, system 916 may includeapplication servers configured to implement and execute service-sidedatabase access user-interface software applications. The applicationservers may be configured to provide related data, code, forms, webpages and other information to and from user systems 912. Additionally,the application servers may be configured to store information to, andretrieve information from a database system. Such information mayinclude related data, objects, and/or Webpage content. With amulti-tenant system, data for multiple tenants may be stored in the samephysical database object in tenant data storage 922, however, tenantdata may be arranged in the storage medium(s) of tenant data storage 922so that data of one tenant is kept logically separate from that of othertenants. In such a scheme, one tenant may not access another tenant'sdata, unless such data is expressly shared.

Several elements in the system shown in FIG. 9 include conventional,well-known elements that are explained only briefly here. For example,user system 912 may include processor system 912A, memory system 912B,input system 912C, and output system 912D. A user system 912 may beimplemented as any computing device(s) or other data processingapparatus such as a mobile phone, laptop computer, tablet, desktopcomputer, or network of computing devices. User system 12 may run aninternet browser allowing a user (e.g., a subscriber of an MTS) of usersystem 912 to access, process and view information, pages andapplications available from system 916 over network 914. Network 914 maybe any network or combination of networks of devices that communicatewith one another, such as any one or any combination of a LAN (localarea network), WAN (wide area network), wireless network, or otherappropriate configuration.

The users of user systems 912 may differ in their respective capacities,and the capacity of a particular user system 912 to access informationmay be determined at least in part by “permissions” of the particularuser system 912. As discussed herein, permissions generally governaccess to computing resources such as data objects, components, andother entities of a computing system, such as a social networkingsystem, and/or a CRM database system. “Permission sets” generally referto groups of permissions that may be assigned to users of such acomputing environment. For instance, the assignments of users andpermission sets may be stored in one or more databases of System 916.Thus, users may receive permission to access certain resources. Apermission server in an on-demand database service environment can storecriteria data regarding the types of users and permission sets to assignto each other. For example, a computing device can provide to the serverdata indicating an attribute of a user (e.g., geographic location,industry, role, level of experience, etc.) and particular permissions tobe assigned to the users fitting the attributes. Permission sets meetingthe criteria may be selected and assigned to the users. Moreover,permissions may appear in multiple permission sets. in this way, theusers can gain access to the components of a system.

In some an on-demand database service environments, an ApplicationProgramming Interface (API) may be configured to expose a collection ofpermissions and their assignments to users through appropriatenetwork-based services and architectures, for instance, using SimpleObject Access Protocol (SOAP) Web Service and Representational StateTransfer (REST) APIs.

In some implementations, a permission set may be presented to anadministrator as a container of permissions. However, each permission insuch a permission set may reside in a separate API object exposed in ashared API that has a child-parent relationship with the same permissionset object, This allows a given permission set to scale to millions ofpermissions for a user while allowing a developer to take advantage ofjoins across the API objects to query, insert, update, and delete anypermission across the millions of possible choices. This makes the APIhighly scalable, reliable, and efficient for developers to use.

In some implementations, a permission set API constructed using thetechniques disclosed herein can provide scalable, reliable, andefficient mechanisms for a developer to create tools that manage auser's permissions across various sets of access controls and acrosstypes of users. Administrators who use this tooling can effectivelyreduce their time managing a user's rights, integrate with externalsystems, and report on rights for auditing and troubleshooting purposes.By way of example, different users may have different capabilities withregard to accessing and modifying application and database information,depending on a user's security or permission level, also calledauthorization. In systems with a hierarchical role model, users at onepermission level may have access to applications, data, and databaseinformation accessible by a lower permission level user, but may nothave access to certain applications, database information, and dataaccessible by a user at a higher permission level.

As discussed above, system 916 may provide on-demand database service touser systems 912 using an MTS arrangement. By way of example, one tenantorganization may be a company that employs a sales force where eachsalesperson uses system 916 to manage their sales process. Thus, a userin such an organization may maintain contact data, leads data, customerfollow-up data, performance data, goals and progress data, etc., allapplicable to that user's personal sales process (e.g., in tenant datastorage 922). In this arrangement, a user may manage his or her salesefforts and cycles from a variety of devices, since relevant data andapplications to interact with (e.g., access, view, modify, report,transmit, calculate, etc.) such data may be maintained and accessed byany user system 912 having network access.

When implemented in an MIS arrangement, system 916 may separate andshare data between users and at the organization-level in a variety ofmanners. For example, for certain types of data each user's data mightbe separate from other users' data regardless of the organizationemploying such users. Other data may be organization-wide data, which isshared or accessible by several users or potentially all users form agiven tenant organization. Thus, some data structures managed by system916 may be allocated at the tenant level while other data structuresmight be managed at the user level. Because an MTS might supportmultiple tenants including possible competitors, the MTS may havesecurity protocols that keep data, applications, and application useseparate. In addition to user-specific data and tenant-specific data,system 916 may also maintain system-level data usable by multipletenants or other data. Such system-level data may include industryreports, news, postings, and the like that are sharable between tenantorganizations.

In some implementations, user systems 912 may be client systemscommunicating with application servers 950 to request and updatesystem-level and tenant-level data from system 916. By way of example,user systems 912 may send one or more queries requesting data of adatabase maintained in tenant data storage 922 and/or system datastorage 924, An application server 950 of system 916 may automaticallygenerate one or more SQL statements (e,g., one or more SQL queries) thatare designed to access the requested data. System data storage 924 maygenerate query plans to access the requested data from the database.

The database systems described herein may be used for a variety ofdatabase applications. By way of example, each database can generally beviewed as a collection of objects, such as a set of logical tables,containing data fitted into predefined categories. A “table” is onerepresentation of a data object, and may be used herein to simplify theconceptual description of objects and custom objects according to someimplementations. It should be understood that “table” and “object” maybe used interchangeably herein, Each table generally contains one ormore data categories logically arranged as columns or fields in aviewable schema. Each row or record of a table contains an instance ofdata for each category defined by the fields. For example, a CRMdatabase may include a table that describes a customer with fields forbasic contact information such as name, address, phone number, faxnumber, etc. Another table might describe a purchase order, includingfields for information such as customer, product, sale price, date, etc.In some multi-tenant database systems, standard entity tables might beprovided for use by all tenants. For CRM database applications, suchstandard entities might include tables for case, account, contact, lead,and opportunity data objects, each containing pre-defined fields. Itshould be understood that the word “entity” may also be usedinterchangeably herein with “object” and “table”. In someimplementations, tenants may be allowed to create and store customobjects, or they may be allowed to customize standard entities orobjects, for example by creating custom fields for standard objects,including custom index fields. Commonly assigned U.S. Pat. No.7,779,039, titled CUSTOM ENTITIES AND FIELDS IN A MULTI-TENANT DATABASESYSTEM, by Weissman et al., issued on Aug. 17, 2010, and herebyincorporated by reference in its entirety and for all purposes, teachessystems and methods for creating custom objects as well as customizingstandard objects in an MTS. In certain implementations, for example, allcustom entity data rows may be stored in a single multi-tenant physicaltable, which may contain multiple logical tables per organization. Itmay be transparent to customers that their multiple “tables” are in factstored in one large table or that their data may be stored in the sametable as the data of other customers.

FIG. 10A shows a system diagram of an example of architecturalcomponents of an on-demand database service environment 1000, configuredin accordance with some implementations. A client machine located in thecloud 1004 may communicate with the on-demand database serviceenvironment via one or more edge routers 1008 and 1012. A client machinemay include any of the examples of user systems ?12 described above. Theedge routers 1008 and 1012 may communicate with one or more coreswitches 1020 and 1024 via firewall 1016. The core switches maycommunicate with a load balancer 1028, which may distribute server loadover different pods, such as the pods 1040 and 1044 by communication viapod switches 1032 and 1036. The pods 1040 and 1044, which may eachinclude one or more servers and/or other computing resources, mayperform data processing and other operations used to provide on-demandservices. Components of the environment may communicate with a databasestorage 1056 via a database firewall 1048 and a database switch 1052.

Accessing an on-demand database service environment may involvecommunications transmitted among a variety of different components. Theenvironment 1000 is a simplified representation of an actual on-demanddatabase service environment. For example, some implementations of anon-demand database service environment may include anywhere from one tomany devices of each type. Additionally, an on-demand database serviceenvironment need not include each device shown, or may includeadditional devices not shown, in FIGS. 10A and 10B.

The cloud 1004 refers to any suitable data network or combination ofdata networks, which may include the Internet. Client machines locatedin the cloud 1004 may communicate with the on-demand database serviceenvironment 1000 to access services provided by the on-demand databaseservice environment 1000. By way of example, client machines may accessthe on-demand database service environment 1000 to retrieve, store,edit, and/or process wire web component information.

In some implementations, the edge routers 1008 and 1012 route packetsbetween the cloud 1004 and other components of the on-demand databaseservice environment 1000. The edge routers 1008 and 1012 may employ theBorder Gateway Protocol (BGP). The edge routers 1008 and 1012 maymaintain a table of IP networks or ‘prefixes’, which designate networkreachability among autonomous systems on the Internet.

In one or more implementations, the firewall 1016 may protect the innercomponents of the environment 1000 from Internet traffic. The firewall1016 may block, permit, or deny access to the inner components of theon-demand database service environment 1000 based upon a set of rulesand/or other criteria. The firewall 1016 may act as one or more of apacket filter, an application gateway, a stateful filter, a proxyserver, or any other type of firewall.

In some implementations, the core switches 1020 and 1024 may behigh-capacity switches that transfer packets within the environment1000. The core switches 1020 and 1024 may be configured as networkbridges that quickly route data between different components within theon-demand database service environment. The use of two or more coreswitches 1020 and 1024 may provide redundancy and/or reduced latency.

In some implementations, communication between the pods 1040 and 1044may be conducted via the pod switches 1032 and 1036. The pod switches1032 and 1036 may facilitate communication between the pods 1040 and1044 and client machines, for example via core switches 1020 and 1024.Also or alternatively, the pod switches 1032 and 1036 may facilitatecommunication between the pods 1040 and 1044 and the database storage1056. The load balancer 1028 may distribute workload between the pods,which may assist in improving the use of resources, increasingthroughput, reducing response times, and/or reducing overhead. The loadbalancer 1028 may include multilayer switches to analyze and forwardtraffic.

In some implementations, access to the database storage 1056 may beguarded by a database firewall 1048, which may act as a computerapplication firewall operating at the database application layer of aprotocol stack. The database firewall 1048 may protect the databasestorage 1056 from application attacks such as structure query language(SQL) injection, database rootkits, and unauthorized informationdisclosure. The database firewall 1048 may include a host using one ormore forms of reverse proxy services to proxy traffic before passing itto a gateway router and/or may inspect the contents of database trafficand block certain content or database requests. The database firewall1048 may work on the SQL application level atop the TCP/IP stack,managing applications' connection to the database or SQL managementinterfaces as well as intercepting and enforcing packets traveling to orfrom a database network or application interface.

In some implementations, the database storage 1056 may be an on-demanddatabase system shared by many different organizations, The on-demanddatabase service may employ a single-tenant approach, a multi-tenantapproach, a virtualized approach, or any other type of databaseapproach. Communication with the database storage 1056 may be conductedvia the database switch 1052. The database storage 1056 may includevarious software components for handling database queries. Accordingly,the database switch 1052 may direct database queries transmitted byother components of the environment (e.g., the pods 1040 and 1044) tothe correct components within the database storage 1056.

FIG. 10B shows a system diagram further illustrating an example ofarchitectural components of an on-demand database service environment,in accordance with some implementations. The pod 1044 may be used torender services to user(s) of the on-demand database service environment1000. The pod 1044 may include one or more content batch servers 1064,content search servers 1068, query servers 1082, file servers 1086,access control system (ACS) servers 1080, batch servers 1084, and appservers 1088. Also, the pod 1044 may include database instances 1090,quick file systems (QFS) 1092, and indexers 1094. Some or allcommunication between the servers in the pod 1044 may be transmitted viathe switch 1036.

In some implementations, the app servers 1088 may include a frameworkdedicated to the execution of procedures (e.g., programs, routines,scripts) for supporting the construction of applications provided by theon-demand database service environment 1000 via the pod 1044. One ormore instances of the app server 1088 may be configured to execute allor a portion of the operations of the services described herein.

In some implementations, as discussed above, the pod 1044 may includeone or more database instances 1090. A database instance 1090 may beconfigured as an MTS in which different organizations share access tothe same database, using the techniques described above. Databaseinformation may be transmitted to the indexer 1094, which may provide anindex of information available in the database 1090 to file servers1086. The QFS 1092 or other suitable filesystem may serve as arapid-access file system for storing and accessing information availablewithin the pod 1044. The QFS 1092 may support volume managementcapabilities, allowing many disks to be grouped together into a filesystem. The QFS 1092 may communicate with the database instances 1090,content search servers 1068 and/or indexers 1094 to identify, retrieve,move, and/or update data stored in the network file systems (NFS) 1096and/or other storage systems.

In some implementations, one or more query servers 1082 may communicatewith the NFS 1096 to retrieve and/or update information stored outsideof the pod 1044. The NFS 1096 may allow servers located in the pod 1044to access information over a network in a manner similar to how localstorage is accessed. Queries from the query servers 1022 may betransmitted to the NFS 1096 via the load balancer 1028, which maydistribute resource requests over various resources available in theon-demand database service environment 1000. The NFS 1096 may alsocommunicate with the QFS 1092 to update the information stored on theNFS 1096 and/or to provide information to the QFS 1092 for use byservers located within the pod 1044.

In some implementations, the content batch servers 1064 may handlerequests internal to the pod 1044. These requests may be long-runningand/or not tied to a particular customer, such as requests related tolog mining, cleanup work, and maintenance tasks. The content searchservers 1068 may provide query and indexer functions such as functionsallowing users to search through content stored in the on-demanddatabase service environment 1000. The file servers 1086 may managerequests for information stored in the file storage 1098, which maystore information such as documents, images, basic large objects(BLOBs), etc. The query servers 1082 may be used to retrieve informationfrom one or more file systems. For example, the query system 1082 mayreceive requests for information from the app servers 1088 and thentransmit information queries to the NFS 1096 located outside the pod1044. The ACS servers 1080 may control access to data, hardwareresources, or software resources called upon to render services providedby the pod 1044. The batch servers 1084 may process batch jobs, whichare used to run tasks at specified times. Thus, the batch servers 1084may transmit instructions to other servers, such as the app servers1088, to trigger the batch jobs.

While some of the disclosed implementations may be described withreference to a system having an application server providing a front endfor an on-demand database service capable of supporting multipletenants, the disclosed implementations are not limited to multi-tenantdatabases nor deployment on application servers. Some implementationsmay be practiced using various database architectures such as ORACLE®,DB2® by IBM and the like without departing from the scope of presentdisclosure.

FIG. 11 illustrates one example of a computing device. According tovarious embodiments, a system 1100 suitable for implementing embodimentsdescribed herein includes a processor 1101, a memory module 1103, astorage device 1105, an interface 1111, and a bus 1115 (e.g., a PCI busor other interconnection fabric.) System 1100 may operate as variety ofdevices such as an application server, a database server, or any otherdevice or service described herein. Although a particular configurationis described, a variety of alternative configurations are possible. Theprocessor 1101 may perform operations such as those described herein.Instructions for performing such operations may be embodied in thememory 1103, on one or more non-transitory computer readable media, oron some other storage device. Various specially configured devices canalso be used in place of or in addition to the processor 1101. Theinterface 1111 may be configured to send and receive data packets over anetwork. Examples of supported interfaces include, but are not limitedto: Ethernet, fast Ethernet, Gigabit Ethernet, frame relay, cable,digital subscriber line (DSL), token ring, Asynchronous Transfer Mode(ATM), High-Speed Serial Interface (HSSI), and Fiber Distributed DataInterface (FDDI). These interfaces may include ports appropriate forcommunication with the appropriate media. They may also include anindependent processor and/or volatile RAM. A computer system orcomputing device may include or communicate with a monitor, printer, orother suitable display for providing any of the results mentioned hereinto a user.

Any of the disclosed implementations may be embodied in various types ofhardware, software, firmware, computer readable media, and combinationsthereof. For example, some techniques disclosed herein may beimplemented, at least in part, by computer-readable media that includeprogram instructions, state information, etc., for configuring acomputing system to perform various services and operations describedherein. Examples of program instructions include both machine code, suchas produced by a compiler, and higher-level code that may be executedvia an interpreter. Instructions may be embodied in any suitablelanguage such as, for example, Apex, Java, Python, C++, C, HTML, anyother markup language, JavaScript, ActiveX, VBScript, or Perl. Examplesof computer-readable media include, but are not limited to: magneticmedia such as hard disks and magnetic tape; optical media such as flashmemory, compact disk (CD) or digital versatile disk (DVD);magneto-optical media; and other hardware devices such as read-onlymemory (“ROM”) devices and random-access memory (“RAM”) devices. Acomputer-readable medium may be any combination of such storage devices.

In the foregoing specification, various techniques and mechanisms mayhave been described in singular form for clarity. However, it should benoted that some embodiments include multiple iterations of a techniqueor multiple instantiations of a mechanism unless otherwise noted. Forexample, a system uses a processor in a variety of contexts but can usemultiple processors while remaining within the scope of the presentdisclosure unless otherwise noted. Similarly, various techniques andmechanisms may have been described as including a connection between twoentities. However, a connection does not necessarily mean a direct,unimpeded connection, as a variety of other entities (e.g., bridges,controllers, gateways, etc.) may reside between the two entities.

In the foregoing specification, reference was made in detail to specificembodiments including one or more of the best modes contemplated by theinventors. While various implementations have been described herein, itshould be understood that they have been presented by way of exampleonly, and not limitation. For example, some techniques and mechanismsare described herein in the context of on-demand computing environmentsthat include MISs. However, the techniques of the present inventionapply to a wide variety of computing environments. Particularembodiments may be implemented without some or all of the specificdetails described herein. In other instances, well known processoperations have not been described in detail in order not tounnecessarily obscure the present invention. Accordingly, the breadthand scope of the present application should not be limited by any of theimplementations described herein, but should be defined only inaccordance with the claims and their equivalents.

1. A method comprising: receiving via a communication interface arequest to provide a graphical user interface (GUI) for presentation ata client machine; identifying via a processor a plurality of wire webcomponents predicted to be included in the GUI, each wire web componentreferencing a respective data object instance, each data object instancebeing associated with a respective data object instance identifier and arespective one or more data object fields; constructing via theprocessor a wire web component graph that includes a plurality of nodes,each of a first subset of the nodes corresponding to a respective one ofthe plurality of wire web components, each of a second subset of thenodes corresponding to a respective one of the data object fields, eachof a third subset of the nodes corresponding to a respective applicationprocedure interface (API), each wire web component being linked in thewire web component graph to a respective one or more of the data objectfields that are included in the wire web component, each nodecorresponding to a respective data field being linked in the wire webcomponent graph to a respective node corresponding to a respective APIfrom which a respective data value associated with the respective datafield can be retrieved; retrieving one or more of the data values fromthe respective APIs based on the wire web component graph; andtransmitting a GUI message to the client machine via the communicationinterface, the GUI message including the retrieved data values and thewire web component graph.
 2. The method recited in claim 1, wherein eachwire web component is associated with respective computer programmingcode configured to cause the client machine to: detect a change to theGUI after the GUI is displayed on a display device, the change affectinga designated one of the retrieved data values; communicate with one ormore of the APIs to update the designated data value; and update the GUIon the display device based on the updated data value.
 3. The methodrecited in claim 1, wherein identifying wire web components predicted tobe included in the GUI involves identifying a first GUI portion likelyto be active when the GUI is initially displayed and a second GUIportion not likely to be active when the GUI is initially displayed. 4.The method recited in claim 1, wherein identifying wire web componentspredicted to be included in the GUI involves applying a pre-trainedmachine learning prediction model to the request to provide the GUI. 5.The method recited in claim 1, wherein identifying wire web componentspredicted to be included in the GUI involves evaluating one or moreprevious requests received from the client machine.
 6. The methodrecited in claim 1, wherein identifying wire web components predicted tobe included in the GUI involves predicting an input parameter to adesignated one of the APIs.
 7. The method recited in claim 1, whereinthe request is received at a server within a cloud computing environmentconfigured to provide on-demand computing services via the Internet 8.The method recited in claim 7, wherein a first one of the APIs isaccessible via the cloud computing environment,
 9. The method recited inclaim 8, wherein a second one of the APIs is external to the cloudcomputing environment.
 10. The method recited in claim 1, wherein eachof the wire web components is associated with a respective wire webcomponent definition implemented via computing programming languagecode, and wherein each of the wire web component definitions includes arespective template implemented via Hypertext Markup Language (HTML).11. The method recited in claim 10, wherein constructing the wire webcomponent graph comprises parsing the respective wire web componentdefinition for each of the plurality of wire web components.
 12. Acomputing system that includes a database system, the computing systemoperable to perform a method comprising: receiving via a communicationinterface a request to provide a graphical user interface (GUI) forpresentation at a client machine; identifying via a processor aplurality of wire web components predicted to be included in the GUI,each wire web component referencing a respective data object instance,each data object instance being associated with a respective data objectinstance identifier and a respective one or more data object fields;constructing via the processor a wire web component graph that includesa plurality of nodes, each of a first subset of the nodes correspondingto a respective one of the plurality of wire web components, each of asecond subset of the nodes corresponding to a respective one of the dataobject fields, each of a third subset of the nodes corresponding to arespective application procedure interface (API), each wire webcomponent being linked in the wire web component graph to a respectiveone or more of the data object fields that are included in the wire webcomponent, each node corresponding to a respective data field beinglinked in the wire web component graph to a respective nodecorresponding to a respective API from which a respective data valueassociated with the respective data field can be retrieved; retrievingone or more of the data values from the respective APIs based on thewire web component graph; and transmitting a GUI message to the clientmachine via the communication interface, the GUI message including theretrieved data values and the wire web component graph.
 13. Thecomputing system recited in claim 12, wherein each wire web component isassociated with respective computer programming code configured to causethe client machine to: detect a change to the GUI after the GUI isdisplayed on a display device, the change affecting a designated one ofthe retrieved data values; communicate with one or more of the APIs toupdate the designated data value; and update the GUI on the displaydevice based on the updated data value.
 14. The computing system recitedin claim 12, wherein identifying wire web components predicted to beincluded in the GUI involves identifying a first GUI portion likely tobe active when the GUI is initially displayed and a second GUI portionnot likely to be active when the GUI is initially displayed.
 15. Thecomputing system recited in claim 12, wherein identifying wire webcomponents predicted to be included in the GUI involves applying apre-trained machine learning prediction model to the request to providethe GUI.
 16. The computing system recited in claim 12, whereinidentifying wire web components predicted to be included in the GUIinvolves evaluating one or more previous requests received from theclient machine.
 17. The computing system recited in claim 12, whereinidentifying wire web components predicted to be included in the GUIinvolves predicting an input parameter to a designated one of the APIs.18. The computing system recited in claim 12, wherein each of the wireweb components is associated with a respective wire web componentdefinition implemented via computing programming language code, andwherein each of the wire web component definitions includes a respectivetemplate implemented via Hypertext Markup Language (HTML), and whereinconstructing the wire web component graph comprises parsing therespective wire web component definition for each of the plurality ofwire web components.
 19. One or more non-transitory computer readablemedia having instructions stored thereon for performing a method, themethod comprising: receiving via a communication interface a request toprovide a graphical user interface (GUI) for presentation at a clientmachine; identifying via a processor a plurality of wire web componentspredicted to be included in the GUI, each wire web component referencinga respective data object instance, each data object instance beingassociated with a respective data object instance identifier and arespective one or more data object fields; constructing via theprocessor a wire web component graph that includes a plurality of nodes,each of a first subset of the nodes corresponding to a respective one ofthe plurality of wire web components, each of a second subset of thenodes corresponding to a respective one of the data object fields, eachof a third subset of the nodes corresponding to a respective applicationprocedure interface (API), each wire web component being linked in thewire web component graph to a respective one or more of the data objectfields that are included in the wire web component, each nodecorresponding to a respective data field being linked in the wire webcomponent graph to a respective node corresponding to a respective APIfrom which a respective data value associated with the respective datafield can be retrieved; retrieving one or more of the data values fromthe respective APIs based on the wire web component graph; andtransmitting a GUI message to the client machine via the communicationinterface, the GUI message including the retrieved data values and thewire web component graph.
 20. The one or more non-transitory computerreadable media recited in claim 19, wherein each wire web component isassociated with respective computer programming code configured to causethe client machine to: detect a change to the GUI after the GUI isdisplayed on a display device, the change affecting a designated one ofthe retrieved data values; communicate with one or more of the APIs toupdate the designated data value; and update the GUI on the displaydevice based on the updated data value.